#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include<fcntl.h>

int main()
{
    close(1);
    int fd1 = open("test1.txt", O_WRONLY | O_CREAT | O_TRUNC, 0666);
    printf("hello printf\n");
    fprintf(stdout, "hello fprintf\n");
    const char *message = "hello fwrite\n";
    fwrite(message, 1, strlen(message), stdout);

    const char* w = "hello write\n";
    write(1,w,strlen(w));
    fork();
    return 0;
}
